package main

import "fmt"

/*
一个函数返回多个值
*/
func calc(a, b int) (int, int, int, int) {
	return a + b, a - b, a * b, a / b
}

func calc1(a, b int) (ra int, rb int, rc int, rd int) {
	fmt.Println("before", ra, rb, rc, rd)
	ra = a + b
	rb = a - b
	rc = a * b
	rd = a / b
	fmt.Println("after", ra, rb, rc, rd)
	return
}

func calc2(a, b int) (ra, rb, rc, rd int) {
	fmt.Println("before", ra, rb, rc, rd)
	ra = a + b
	rb = a - b
	rc = a * b
	rd = a / b
	fmt.Println("after", ra, rb, rc, rd)
	return
}

func main() {
	i, i2, i3, i4 := calc1(4, 2)
	fmt.Println("hello", i, i2, i3, i4)
}
